<?php
session_start();
require ('../classes/Conf.php');
require ('../classes/ConnectionSecure.php');
include ('../validar_sesion.php');
require ('../classes/Connection.php');
require ('../classes/Usuarios.php');
require ('../classes/Transacciones.php');

?>



<!DOCTYPE html>
<html class="no-js">
    <head>
        <meta charset="utf-8">
        <title>Historico de transacciones</title>
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width">
        <meta name="author" content="templatemo">
        <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,800,700,600,300' rel='stylesheet' type='text/css'>

        <link rel="stylesheet" href="../resources/css/bootstrap.min.css">
        <link rel="stylesheet" href="../resources/css/font-awesome.css">
        <link rel="stylesheet" href="../resources/css/animate.css">
        <link rel="stylesheet" href="../resources/css/templatemo_misc.css">
        <link rel="stylesheet" href="../resources/css/templatemo_style.css">

        <script src="../resources/js/vendor/modernizr-2.6.1-respond-1.1.0.min.js"></script>
    </head>
    <body>



        <div class="site-header">
            <div class="container">
                <div class="main-header">
                    <div class="row">
                        <div class="col-md-4 col-sm-6 col-xs-10">
                            <div class="logo">
                                <a rel="nofollow" href="http://www.templatemo.com/preview/templatemo_409_travel">
                                    <img src="../resources/images/logoBanqueaChevere.png" alt="travel by templatemo" title="travel - free html5 template">
                                </a>
                            </div> <!-- /.logo -->
                        </div> <!-- /.col-md-4 -->
                        <div class="col-md-8 col-sm-6 col-xs-2">
                            <div class="main-menu">
                                <ul class="visible-lg visible-md">
                                    <li><a href="../index.php">Home</a></li>
                                    <li  class="active"><a href="#">Historico</a></li>
                                    <li><a href="transaccion_formulario.php">Transacciones</a></li>                                                                        
                                    <li><a href="cargueMasivo.php">C. Masivo</a></li>                                    
                                    <li><a href="../compresser/compress.php">D. token</a></li>                                     
                                    <li><a href="../salir.php">Salir</a></li>                                    
                                </ul>
                                <a href="#" class="toggle-menu visible-sm visible-xs">
                                    <i class="fa fa-bars"></i>
                                </a>
                            </div> <!-- /.main-menu -->
                        </div> <!-- /.col-md-8 -->
                    </div> <!-- /.row -->
                </div> <!-- /.main-header -->
                <div class="row">
                    <div class="col-md-12 visible-sm visible-xs">
                        <div class="menu-responsive">
                            <ul>
                                <li><a href="../index.php">Home</a></li>
                                <li  class="active"><a href="#">Historico</a></li>
                                <li><a href="transaccion_formulario.php">Transacciones</a></li>   
                                <li><a href="cargueMasivo.php">C. Masivo</a></li>                                    
                                <li><a href="../compresser/compress.php">D. token</a></li>                                     
                                <li><a href="../salir.php">Salir</a></li>                                    
                            </ul>
                        </div> <!-- /.menu-responsive -->
                    </div> <!-- /.col-md-12 -->
                </div> <!-- /.row -->
            </div> <!-- /.container -->
        </div> <!-- /.site-header -->

        <div class="page-top" id="templatemo_contact">
        </div> <!-- /.page-header -->

        <div class="contact-page">
            <div class="container">
                <div class="row">

                    <div class="col-md-5 col-sm-6">
                        <h3 class="widget-title">Histórico de Transacciones</h3>
                        <div class="contact-form">


                            <?php
                            $usr = new Usuarios();
                            $id = $usr->idFromUsuario($_SESSION['Username']);

                            $obj = new Transacciones();
                            $result = $obj->consiltarTransaccionesUsuario($id);

                            if (mysql_num_rows($result) > 0) {
                                ?>
                                <form action="aprobarRegistroUsuario.php" method="post" enctype="multipart/form-data" id="myForm">
                                    <?php
                                    echo "<table class='table'>";
                                    echo '<tr  class="success">';
                                    echo "<td><strong>Numero</strong></td>" . "<td><strong>Usuario</strong></td>" . "<td><strong>Origen</strong></td>" . "<td><strong>Destino</strong></td>" . "<td><strong>Aprobada</strong></td>" . "<td><strong>Monto</strong></td>";
                                    echo '</tr>';
                                    while ($fila = mysql_fetch_row($result)) {
                                        echo '<tr>';
                                        $aprob = "NO";
                                        if ($fila[3])
                                            $aprob = "SI";
                                        echo "<td>{$fila[0]}</td>" . "<td>{$fila[2]}</td>" . "<td>{$fila[5]}</td>" . "<td>{$fila[1]}</td>" . "<td>{$aprob}</td>" . "<td>{$fila[4]}</td>";
                                        echo '</tr>';
                                    }
                                    echo "</table>";
                                    ?>
                                </form>
                                <?php
                            } else {
                                ?>
                                <div class="alert alert-warning">
                                    <strong>No hay transacciones</strong>
                                </div>
                                <?php
                            }
                            ?>


                        </div> <!-- /.contact-form -->
                    </div>
                </div>
            </div>
        </div>






        <div class="site-footer">
            <div class="container">
                <div class="row">
                    <div class="col-md-4 col-sm-4">
                        <div class="footer-logo">
                            <a href="index.html">
                                <img src="../resources/images/logoBanqueaChevere.png" alt="">
                            </a>
                        </div>
                    </div> <!-- /.col-md-4 -->
                    <div class="col-md-4 col-sm-4">
                        <div class="copyright">
                            <span>Copyright &copy; 2084 <a href="#">Company Name</a> - <a rel="nofollow" href="http://www.templatemo.com/preview/templatemo_409_travel">Travel</a> by <a rel="nofollow" href="http://www.templatemo.com">templatemo</a></span>
                        </div>
                    </div> <!-- /.col-md-4 -->
                    <div class="col-md-4 col-sm-4">
                        <ul class="social-icons">
                            <li><a href="#" class="fa fa-facebook"></a></li>
                            <li><a href="#" class="fa fa-twitter"></a></li>
                            <li><a href="#" class="fa fa-linkedin"></a></li>
                            <li><a href="#" class="fa fa-flickr"></a></li>
                            <li><a href="#" class="fa fa-rss"></a></li>
                        </ul>
                    </div> <!-- /.col-md-4 -->
                </div> <!-- /.row -->
            </div> <!-- /.container -->
        </div> <!-- /.site-footer -->
        <script src="../resources/js/vendor/jquery-1.11.0.min.js"></script>
        <script>window.jQuery || document.write('<script src="../resources/js/vendor/jquery-1.11.0.min.js"><\/script>')</script>
        <script src="../resources/js/bootstrap.js"></script>
        <script src="../resources/js/plugins.js"></script>
        <script src="../resources/js/main.js"></script>


    </body>
</html>

